#ifndef MY_PIPE_H__
#define MY_PIPE_H__

#include <stdio.h>
#include <stdlib.h>

#define PIPESIZE 		1024
#define MYPIPE_READ		0x00000001UL
#define MYPIPE_WRITE	0x00000002UL

typedef void mypipe_t;

mypipe_t *mypipe_init(void);

int mypipe_register(mypipe_t *ptr, int opmap);

int mypipe_unregister(mypipe_t *ptr, int opmap);

int mypipe_read(mypipe_t *ptr, void *buf, size_t size);

int mypipe_write(mypipe_t *ptr, void *buf, size_t size);

int mypipe_destory(mypipe_t *ptr);

#endif
